// import request from "@/utils/request";
import axios from "axios";
// const baseURL = 'http://big-event-vue-api-t.itheima.net'

// 获取配置信息 
export const getConfig = () => {
    return new Promise((resolve,reject) => {
        axios({
            url: "http://127.0.0.1:4000/getConfig",
            method: "get",
        }).then((res) => {
            resolve(res)
        });
    })
}
// 更新配置信息
export const updateConfig = (config) => {
  return new Promise((resolve, reject) => {
    axios({
      url: "http://127.0.0.1:4000/updateConfig",
      method: "post",
      data: { config },
    }).then((res) => {
      resolve(res);
    });
  });
};